:: [Int] -> Int package:LambdaHack

A version specialized to lists to avoid errors such as taking length of Maybe [a] instead of [a]. Such errors are hard to detect, because the type of elements of the list is not constrained.
Extract the last element of a list, which must be finite and non-empty.
Extract the first element of a list, which must be non-empty.